-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix ajax no access error #23910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.x-dev
Are you sure you want to change the base?
Fix ajax no access error #23910
Conversation
|
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
b8ea408 to
b795c1a
Compare
Thanks for your input on this @sgiehl. Cheers |
…is not the same as token saved for user
…ession has expired or is invalid
…rue otherwise, just fail silently return error message
… for network to be idle before doing some page actions
…error message since we have put back most ajax calls to fail silently
…ion time is empty/null
…his results in a successful call (since we allow anonymous user to access the api), we just need to check the session timed out header and do a refresh if it exists
…hanges to returned http code and exception thrown.
345e17b to
ebc08c1
Compare
ebc08c1 to
07714c8
Compare
Description
Dev-19785
This PR is to fix the regression we had when we tried to redirect invalid session errors to login page (https://innocraft.atlassian.net/browse/UX-305).
We only want to force the redirect when we actually detect an invalid session issue and not to redirect ALL NoAccessExceptions. We will retain the original behaviour of NoAccessException for ajax calls to just fail silently and just returning the error message.
Testing:
NOTE: The only way I could test this fix was to try to do some datatable actions that will trigger saving of table preference. This would show errors and will refresh the page with no change in the sorting when the issue is not fixed. This happened when the regression was introduced and was noticeable on our Demo Site.
If the issue is fixed, the datatable should not give any errors and sorting should work (although it will not be saved because it is 'anonymous' user).
This should still error and redirect if a session becomes invalid (session expires or is deleted). I was able to test this by logging in as an admin to my local site. Then deleted my session (or changing the expire date to something in the past), then clicking on a new category/page or even just trying to sort the datatable.
Checklist
Review